package com.company;

import com.company.dao.PhoneMapper;
import com.company.test.A;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        AbstractApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
        PhoneMapper pm = (PhoneMapper) context.getBean("phoneMapper");
        System.out.println(pm.queryById(3));
        A ta = (A)context.getBean("a");
        ta.a();
    }
}
